Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor of record system code and migrate all record UI to TGUI #6266

Closed
wants to merge 119 commits into from
Closed

Refactor of record system code and migrate all record UI to TGUI #6266

wants to merge 119 commits into from

Conversation

vero5123
Copy link
Contributor

@vero5123 vero5123 commented May 9, 2024

About the pull request

This pr is part one of a two part plan I have to overhaul the medical record system and give it actual utility. The idea is to improve the medical record keeping mechanic and make it actually useful outside of strictly RP.

Here is the general idea:
The new medical record system will still contain fluff data that really isn't that important but has its usefulness in RP, however, it will be significantly reduced in this domain (you can still put notes and what not). Instead, there will be a new autopsy mechanic that will take its place. The gist is that whenever a scalped marine is brought to the morgue the medical staff can optionally perform an autopsy on them and through that autopsy (it will require a little bit of brain usage since you will have to guess the cause of death) the marines can gain tech points. You are not by any means forced to do it, completely optional.

Part 1

This is the current PR.

  • In this pr I ripped out the legacy shitcode for medical laptops and replaced it with my own shitcode, the difference being it now uses TGUI UI.
  • You may now submit an autopsy report ONCE for a given target user although the functionality for tech points has yet to be implemented. (the idea being you get one shot at guessing the cause of death correctly)
  • The amount of medical record fluff has been reduced and is much simpler now. You can still modify the following medical records: General notes (the b.s. you set in your character selection), Psychiatric illnesses, Infectious Diseases, Known Disabilities. (if you want more, lmk)
  • The health status of crew can now be one of three options: Deceased, Active, Unfit (i'm gonna do something with unfit probably)
  • Now don't get angry BUT you now need the ID of the target to modify their records, the reason being if your going to get tech points in the future for doing an autopsy; it would make sense that you can only do the report if you have their ID in hand and the corpse in the morgue. Also, it's a lot harder to grief someone's medical records if you don't have their ID. I'm more than willing to change my mind on this and we can talk about it respectfully on discord. I know you can just right click, but the plan will be to restrict that functionality a bit if it's not for frontline use.
  • and of course existing functionality like printing medical records is still a thing.
  • my ui is not stellar and is a bit bear bones, but I wanted to get something up so I could work on part 2, as I want to get the functionality out of the way.
  • Some technical stuff for the maintainers, you will see it anyway, but I essentially stole modified the existing identification computer code to meet my needs and threw in some OOP for future similar computers. I also subtyped the squad changer and modified the ui to align it with the new functionality.

Part 2

This is the next planned PR.
I don't have all the details, but the plan is to get a functional autopsy system working and maybe give bonuses for things like exotic species, such as the predator or whatnot (give incentive for the marines to actually kill one). Hopefully this would be the meat and potatoes of the implementation and the autopsy system would have some good mechanics.

Conclusion

If you don't like something and think there is room for improvement please message me on discord. I will be much more receptive there then if you leave hate comments on my pr. I'm open to anything and everything.
For the maintainers, there is plenty of copy pasta that needs to be refactored (single letter vars, silly logic, etc), and i'm on it.

Edit: This pr has essentially turned into an overhaul of the record system in general, with multiple UI changes.

Changelog

🆑
add: Adds autopsy data to medical records
ui: New TGUI UI for viewing security records
ui: Squad modifier is now more intuitive to use, UI tweak.
ui: New TGUI UI for viewing medical records.
code: Refactored the record system and cleaned up legacy code.
/:cl:

@vero5123 vero5123 requested a review from Nanu308 as a code owner May 9, 2024 06:22
@github-actions github-actions bot added Mapping did you remember to save in tgm format? UI deletes nanoui/html Feature Feature coder badge labels May 9, 2024
@cm13-github cm13-github added the Merge Conflict PR can't be merged because it touched too much code label Jun 6, 2024
@cm13-github
Copy link
Contributor

This pull request has conflicts, please resolve those before we can evaluate the pull request.

@vero5123 vero5123 requested a review from Drulikar June 6, 2024 19:18
@cm13-github
Copy link
Contributor

Conflicts have been resolved. A maintainer will review the pull request shortly.

@cm13-github cm13-github removed the Merge Conflict PR can't be merged because it touched too much code label Jun 6, 2024
@vero5123 vero5123 requested a review from kiVts June 9, 2024 21:28
Copy link
Contributor

@mullenpaul mullenpaul left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've gone through the backend code, still need to review the tgui / test the UIs and test in general. Generally looking ok but theres a lot of changes to code that I'm not familiar with

code/modules/mob/living/carbon/human/human.dm Outdated Show resolved Hide resolved
code/modules/mob/living/carbon/human/human.dm Outdated Show resolved Hide resolved
code/modules/mob/living/carbon/human/human.dm Outdated Show resolved Hide resolved
code/modules/paperwork/filingcabinet.dm Outdated Show resolved Hide resolved
code/modules/paperwork/filingcabinet.dm Outdated Show resolved Hide resolved
@cm13-github
Copy link
Contributor

This pull request has conflicts, please resolve those before we can evaluate the pull request.

@cm13-github cm13-github added the Merge Conflict PR can't be merged because it touched too much code label Jun 15, 2024
@cm13-github
Copy link
Contributor

Conflicts have been resolved. A maintainer will review the pull request shortly.

@cm13-github cm13-github removed the Merge Conflict PR can't be merged because it touched too much code label Jun 15, 2024
@vero5123 vero5123 closed this Jun 20, 2024
@vero5123
Copy link
Contributor Author

vero5123 commented Jun 20, 2024

I don't have time to work on this. If someone wants they can pick up this PR in the future, you have my full permission to do whatever you want with it but please credit me. Thank you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Code Improvement Make the code longer Feature Feature coder badge Mapping did you remember to save in tgm format? UI deletes nanoui/html
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants